﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _8_Factory
{
    class SimpleFactory
    {
        public static LeiFeng CreateLeifeng(string type)
        {
            switch (type)
            {
                case "大学生":
                    return new Undergraduate();
                case "社区自愿者":
                    return new Volunteer();
                default:
                    return new LeiFeng();
            }
        }
    }
}
